<%@ page contentType="text/html;charset=UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> 
<%@ taglib prefix="pg" uri="http://jsptags.com/tags/navigation/pager" %>
<html>
<head>
<title>产品类别管理</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="/css/vip.css" type="text/css">
<script language="JavaScript">
</script>
<SCRIPT language=JavaScript src="/js/FoshanRen.js"></SCRIPT>
</head>

<body bgcolor="#FFFFFF" text="#000000" marginwidth="0" marginheight="0">
<form action="/control/product/type/list" method="post">
	<pg:pager  url="product" items="100" export="currentPageNumber=pageNumber" maxPageItems="3">  
	 <pg:param name="parentId" />   
  <pg:first>   
    <a href="${pageUrl}">首页</a>   
  </pg:first>   
  <pg:prev>   
    <a href="${pageUrl }">上一页</a>   
  </pg:prev>   
  <pg:pages>   
    <c:choose>   
      <c:when test="${currentPageNumber eq pageNumber}">   
        <font color="red">${pageNumber }</font>   
      </c:when>   
      <c:otherwise>   
        <a href="${pageUrl }">${pageNumber }</a>   
      </c:otherwise>   
    </c:choose>   
  </pg:pages>   
  <pg:next>   
    <a href="${pageUrl }">下一页</a>   
  </pg:next>   
  <pg:last>   
    <a href="${pageUrl }">尾页</a>   
  </pg:last>   
</pg:pager> 
  <table width="98%" border="0" cellspacing="1" cellpadding="2" align="center">
    <tr ><td colspan="6"  bgcolor="6f8ac4" align="right">
   </td></tr>
    <tr>
      <td width="8%" bgcolor="6f8ac4"> <div align="center"><font color="#FFFFFF">代号</font></div></td>
      <td width="5%" nowrap bgcolor="6f8ac4"> <div align="center"><font color="#FFFFFF">修改</font></div></td>
      <td width="20%" bgcolor="6f8ac4"> <div align="center"><font color="#FFFFFF">产品类别名称</font></div></td>
	  <td width="10%" nowrap bgcolor="6f8ac4"> <div align="center"><font color="#FFFFFF">创建下级类别</font></div></td>
	  <td width="15%" bgcolor="6f8ac4"><div align="center"><font color="#FFFFFF">所属父类</font></div></td>
	  <td nowrap bgcolor="6f8ac4"> <div align="center"><font color="#FFFFFF">备注</font></div></td>
    </tr>
<!---------------------------LOOP START------------------------------>
<c:forEach items="${list}" var="id">
    <tr>
      <td bgcolor="f5f5f5"> <div align="center"><input type="checkbox" name="items" value=${id.typeId} /></div></td>
      <td bgcolor="f5f5f5"> <div align="center">${id.typeId}</div></td>
      <td bgcolor="f5f5f5"> <div align="center">
	  <img src="/images/edit.gif" width="15" height="16" border="0"></a></div></td>
	  <td bgcolor="f5f5f5"> <div align="center"><a href="product?parentId=${id.typeId}">${id.name}</a></div></td>
	  <td bgcolor="f5f5f5" align="center"><c:if test="${!empty entry.parent}">${entry.parent.name}</c:if></td>
	  <td bgcolor="f5f5f5">${entry.note }</td>
	</tr>
</c:forEach>
    <!----------------------LOOP END------------------------------->
    <tr> 
      <td bgcolor="f5f5f5" colspan="6" align="center"><table width="100%" border="0" cellspacing="1" cellpadding="3">
          <tr> 
            <td width="5%"><input type="checkbox" name="all" /></td>
              <td width="85%">
              <input name="AddDic" type="button" class="frm_btn" id="AddDic" onClick="window.location.href='add_productType.jsp'" value="添加类别" /> &nbsp;&nbsp;
			  <input name="query" type="button" class="frm_btn" id="query" onClick="javascript:window.location.href="" value=" 查 询 "> &nbsp;&nbsp;
            </td>
          </tr>
        </table></td>
    </tr>
  </table>
</form>
</body>
</html>